﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace store.Areas.Home.Controllers
{
    public class IndexController : Controller
    {

        private readonly storeEntities _db = new storeEntities();
        //
        // GET: /Home/Index/

        public ActionResult Index()
        {
            List<Module> module = _db.Modules.Where(x => x.Active == true).OrderBy(x => x.SortNumber).ToList();
            ViewBag.ModuleCenter = module;
            return View();
        }
        [ChildActionOnly]
        public ActionResult NavMenu()
        {
            return PartialView("_PartialNavMenu", _db.Categories.ToList());
        }

    }
}
